home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16998 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.channel1.com!channel1!dspse.bedford
  2. Distribution: world
  3. Newsgroups: comp.lang.c++
  4. Subject: [Q]Virtualizing/Deriving
  5. From: dspse.bedford@channel1.com (Dspse Bedford)
  6. Message-ID: <40.91023.1613@channel1.com>
  7. Date: Fri, 12 Apr 1996 06:33:00 -0500
  8. Organization: Channel 1(R) 617-864-0100 Info
  9.  
  10.  
  11. I just started using C++ so bare with me.
  12.  
  13. Lets say I have a base class, BASE, with lots and lots of operators and 
  14. member functions virtualized, like 10,000. Now I create 100 derived classes 
  15. with BASE as their parent.  The first 99 derived classes use all of the 
  16. operators and member function which exist in BASE, of course, if they need 
  17. to redefine any they will.  The last derived class does not use some of the 
  18. operators defined, lets say 2 out of 10,000. Now if I don't define these 2 
  19. operators, the compiler will go pick up the parent definition if a user of 
  20. the last derived class attempts to use any of these two operators.
  21.   What can I do such that the compiler will give an error to the user?  I 
  22. do not want to create another base class if possible.
  23.  
  24. Thank you
  25. Anastasios Maurudis
  26. Algorithm Research and Development Group
  27. DSP Software Engineering, Inc.
  28. 175 Middlesex Turnpike
  29. Bedford, MA 01730 USA
  30. Voice: 617-275-3733
  31. Fax:   617-275-4323
  32.  
  33. ---
  34.  * WR 1.32 # 331 * Beam me up Scotty, it ate my Phaser!
  35.